package com.enfi.api.modules.db.entity;

import com.enfi.api.modules.db.base.BaseEmbeddedIdEntity;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serializable;




/**
 * (SqlCopy)实体类
 *
 * @author wind
 * @since 2020-04-08 10:44:56
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="t_tbl_sql_copy")
@EntityListeners(AuditingEntityListener.class)
@DynamicInsert
@DynamicUpdate
public class SqlCopy extends BaseEmbeddedIdEntity<SqlCopy.FirstEntityId> {

    private static final long serialVersionUID = 1L;


    @Embeddable
    @Data
    public static class FirstEntityId implements Serializable {
        private Integer id;
        private Integer code;
    }

        
    private String title;

        
    private String content;


}